*********************************************************
*********************************************************
*                  RELIGIOSITY PROJECT                  *	
* 	          	EXPERTS SURVEY - ANALYSIS       		*
***      		Last modified in Oct 2023        	 ****
*********************************************************
*********************************************************


***********
**# Setup
***********
clear all
set more off
set maxvar 32000
set scheme s2color


***************
**# Load Data
***************
use "$data/Experts.dta", clear


************
**# Figure
************

	* GRAPH - all	
	local label1 "(a) Importance of religion in life"
	local label2 "(b) Prevalence of religious behaviors and practices"
	local label5 "(c) Religious Conversions"
	local label6 "(d) Conversions into Catholic Church"
	local label7 "(e) Conversions into Protestant Anglican Church"
	local label8 "(f) Conversions into Pentecostal Church"
 
 
	foreach i of numlist 1 2 5 6 7 8  {																																								
		histogram hyp_`i'_lump_sign_d,  nodraw discrete percent fcolor(edkblue) lcolor(edkblue) barwidth(0.7) ///
					addlabel addlabopts(mlabsize(1.9) mlabgap(0.5)) ///
					yscale(off) yscale(line) ylabel(#7, nogrid) ///
					xtitle("`label`i''", size(2.7) margin(vsmall) color(black) ) xlabel(0(1)6, labels labsize(1.7) labgap(minuscule) valuelabel ticks) xsize(4) ///
					graphregion(fcolor(white) lcolor(none) lwidth(none) lpattern(blank) ifcolor(none) ilcolor(none) ilwidth(none) ilpattern(blank)) ///
					plotregion(fcolor(white) lcolor(white) lwidth(none) lpattern(blank) ifcolor(white) ilcolor(white) ilwidth(none) ilpattern(blank)) ///
					name("hyp`i'_sign_d_all" , replace) 
	}

				

	gr combine 	hyp1_sign_d_all hyp2_sign_d_all hyp5_sign_d_all hyp6_sign_d_all hyp7_sign_d_all hyp8_sign_d_all, ///
				cols(2) xsize(9) ysize(10) graphregion(fcolor(white) lcolor(none) lwidth(none) lpattern(blank) ifcolor(none) ilcolor(none) ilwidth(none) ilpattern(blank))
				
	graph export "$tables/experts_graph.pdf", replace

				
**********************	
**# Table Statistics
**********************
	
	tab discipline
	/*
		   discipline |      Freq.     Percent        Cum.
	------------------+-----------------------------------
			Economics |         49       31.61       31.61
			Sociology |         58       37.42       69.03
	Political Science |         19       12.26       81.29
		   Psychology |         19       12.26       93.55
				Other |         10        6.45      100.00
	------------------+-----------------------------------
				Total |        155      100.00

	*/
	
	
	
	tab title_num
	/*
			  title_num |      Freq.     Percent        Cum.
	--------------------+-----------------------------------
	Assistant Professor |          3        1.94        1.94
	Associate Professor |         26       16.77       18.71
			  Professor |        108       69.68       88.39
				  Other |         18       11.61      100.00
	--------------------+-----------------------------------
				  Total |        155      100.00
	*/
	
	
	
	tab experience
	/*
										Q34 |      Freq.     Percent        Cum.
	----------------------------------------+-----------------------------------
	Researcher who has not worked directly  |          7        4.52        4.52
	Researcher who has worked on evaluating |         15        9.68       14.19
	  Researcher who has worked on religion |        116       74.84       89.03
	Researcher who has worked on testing se |         17       10.97      100.00
	----------------------------------------+-----------------------------------
									  Total |        155      100.00
	*/



	tab experience_kenya
	/*
			Q35 |      Freq.     Percent        Cum.
	------------+-----------------------------------
			 No |        147       94.84       94.84
			Yes |          8        5.16      100.00
	------------+-----------------------------------
		  Total |        155      100.00
	*/





